package user_service

import (
	"context"
	user2 "git.mycaigou.com/gfyx/micro-gfyx-mp-api/http_server/dto/user"
	"git.mycaigou.com/gfyx/micro-gfyx-mp-api/infrastructure/dto/common"
)

type UserSerivceIface interface {
	// 小程序账号绑定
	MpBindUser(ctx context.Context, openId, mobile string, unionId string) (*LoginInfo, error)
	// 获取用户信息
	GetUserInfoByGlobalUserId(ctx context.Context, userId string) (*LoginInfo, error)
	TestTenantDbEnable(ctx context.Context, userId string) (string, error)
	// 获取用户信息
	GetUserInfoByOpenId(ctx context.Context, openId string) (*LoginInfo, error)
	// 静默登录
	MpUserLogin(ctx context.Context, openId string, unionId string) (*LoginInfo, error)
	// 短信验证码登录
	SmsLogin(ctx context.Context, request *common.SmsLoginRequest) (*LoginInfo, error)
	// 验证token
	VerifyToken(ctx context.Context, token string) (info *UserInfo, tenantInfo *TenantInfo, err error)

	/***********  同步模块，待删除 **********/

	//同步全量租户用户
	SyncAllUser(ctx context.Context, tenantCode string, pagesize int32) (bool, error)
	//增量同步用户
	IncrSyncUser(ctx context.Context, tenantCode, operation string, userList []IncrUserInfo) (bool, error)
	//同步单租户用户
	SyncTenantUser(ctx context.Context, tenantCode string, pagesize int32) (bool, error)
	// 用户申请信息
	UserApply(ctx context.Context, mobile string) error

	//同步全量租户角色
	SyncAllRole(ctx context.Context, tenantCode string, pagesize int32) (bool, error)
	SyncAllTenantProfit(ctx context.Context, tenantCode string, syncAllTenantProfitRequest *user2.SyncAllTenantProfitRequest) (bool, error)

	SyncAllUserActionRightInfos(ctx context.Context, tenantCode string) (bool, error)
	SyncAllOrganizations(ctx context.Context, tenantCode string) (bool, error)

	SyncAllUserRoleRelation(ctx context.Context, tenantCode string, pagesize int32) (bool, error)
}
